/PROG  ZPNS0001
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53103802_03";
PROG_SIZE	= 3333;
CREATE		= DATE 12-07-17  TIME 13:53:42;
MODIFIED	= DATE 12-07-17  TIME 15:47:20;
FILE_NAME	= PNS0001;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3789;
PROTECT		= READ;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0001 ;
   7:  !  PART:  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=75    ;
  13:  R[18]=1    ;
  14:  R[19]=.3    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  26:J P[2:PICK POUNCE] 50% CNT100 BREAK ACC150    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1]=R[1]+1    ;
  38:  R[2]=TIMER[2]    ;
  39:  R[3]=60/R[2]    ;
  40:  R[8]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  48:  IF DI[29]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  TIMER[3]=START ;
  53:  OVERRIDE=R[5] ;
  54:J P[3:PICK APPROACH] 100% CNT100 ACC150    ;
  55:   ;
  56:J P[4:PICK] 100% CNT25 TB R[18]sec,CALL PARTPICK BREAK ACC150    ;
  57:  PAYLOAD[2] ;
  58:   ;
  59:J P[5:PICK DEPART] 100% CNT100 ACC150    ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:   ;
  63:J P[6:PICK SNEAK] 100% CNT100 DB  500.0mm,DO[5]=PULSE,0.5sec ACC150    ;
  64:J P[7:PICK CLEAR] 100% CNT100 ACC150    ;
  65:   ;
  66:  DO[8]=PULSE,1.0sec ;
  67:  LBL[30:GOTO DROP POUNCE] ;
  68:J P[8:DROP POUNCE] 100% CNT100 BREAK ACC150    ;
  69:   ;
  70:  TIMER[3]=STOP ;
  71:  LBL[40:AT DROP POUNCE] ;
  72:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  73:  IF DI[7]=ON AND DI[5]=ON,JMP LBL[50] ;
  74:  IF DI[18]=ON,JMP LBL[60] ;
  75:  JMP LBL[40] ;
  76:   ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  TIMER[3]=START ;
  79:  OVERRIDE=R[5] ;
  80:J P[9:DROP SNEAK] 100% CNT100 BREAK ACC150    ;
  81:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[18]=ON,JMP LBL[40] ;
  84:  JMP LBL[51] ;
  85:  JMP LBL[50] ;
  86:   ;
  87:  LBL[60:MOVE CLS-PRS-ACC] ;
  88:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  89:  PAUSE ;
  90:  JMP LBL[40] ;
  91:   ;
  92:  LBL[80:DROP ENABLED] ;
  93:  TIMER[3]=START ;
  94:  !PROCEED TO DROP ;
  95:  OVERRIDE=R[5] ;
  96:J P[10:DROP APPROACH] 100% CNT100 ACC150    ;
  97:   ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT50 TB R[19]sec,CALL PARTDROP BREAK ACC150    ;
 100:  DO[6]=PULSE,1.5sec ;
 101:  PAYLOAD[1] ;
 102:   ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC150    ;
 104:  CALL CHK_DROP    ;
 105:   ;
 106:J P[13:DROP CLEAR] 100% CNT100 DB    0.0mm,DO[7]=PULSE,0.5sec ACC150    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 BREAK ACC150    ;
 109:  IF DI[29]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100 ACC150    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1986.203  mm,	Y =    -8.098  mm,	Z = -1015.211  mm,
	W =  -179.183 deg,	P =     1.681 deg,	R =  -179.587 deg,
	E1=   104.349 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.399  mm,	Y =  1318.044  mm,	Z =  -999.567  mm,
	W =   179.320 deg,	P =     1.371 deg,	R =   150.802 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.938  mm,	Y =  3269.068  mm,	Z =  -960.468  mm,
	W =   179.459 deg,	P =    -1.028 deg,	R =    89.132 deg,
	E1=   195.913 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.938  mm,	Y =  3269.068  mm,	Z = -1107.828  mm,
	W =   179.459 deg,	P =    -1.028 deg,	R =    89.132 deg,
	E1=   195.913 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.937  mm,	Y =  3269.067  mm,	Z =  -927.188  mm,
	W =   179.459 deg,	P =    -1.028 deg,	R =    89.132 deg,
	E1=   195.913 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2245.706  mm,	Y =  2197.844  mm,	Z =  -972.601  mm,
	W =   178.758 deg,	P =      .469 deg,	R =   128.450 deg,
	E1=   156.459 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.399  mm,	Y =  1318.044  mm,	Z =  -999.567  mm,
	W =   179.320 deg,	P =     1.371 deg,	R =   150.802 deg,
	E1=   134.033 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.561  mm,	Y = -1000.720  mm,	Z = -1006.157  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2197.313  mm,	Y = -1873.752  mm,	Z =  -984.043  mm,
	W =  -177.578 deg,	P =     -.243 deg,	R =  -136.785 deg,
	E1=    61.395 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2652.838  mm,	Y = -3240.656  mm,	Z =  -934.871  mm,
	W =  -179.268 deg,	P =    -3.001 deg,	R =   -90.916 deg,
	E1=    15.370 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2652.835  mm,	Y = -3240.656  mm,	Z = -1094.907  mm,
	W =  -179.250 deg,	P =    -4.130 deg,	R =   -90.917 deg,
	E1=    15.370 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2652.835  mm,	Y = -3240.655  mm,	Z = -1031.547  mm,
	W =  -179.250 deg,	P =    -4.130 deg,	R =   -90.917 deg,
	E1=    15.370 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.561  mm,	Y = -1000.720  mm,	Z = -1006.157  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
/END
